#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n;
    int res = 0;
    int a[n];
    int b[n];
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
    }
    for (int i = 0; i < n; i++)
    {
        cin >> b[i];
    }
    for (int i = 0; i < n; i++)
    {
        res += a[i] * b[i];
    }
    cout << res;
    
    return 0;
}